<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org"
      xmlns="http://www.w3.org/1999/xhtml" layout:decorate="~{layout/template}">
<head>
    <title>新增</title>
    <link rel="stylesheet" href="/css/process/config/add.css"/>
</head>
<body>
<div id="contentContainer" layout:fragment="content" class="contentContainer navItem" v-cloak>

    <el-row>
        <el-col :span="12" :offset="6">
            <el-form :model="form" :rules="rules" ref="form" label-width="120px">
                <el-form-item label="流程配置Key" prop="processConfigKey">
                    <el-input v-model="form.processConfigKey"></el-input>
                </el-form-item>
                <el-form-item label="流程分类" prop="processCategoryId">
                    <el-select v-model="form.processCategoryId" clearable
                               placeholder="请选择流程分类"
                               @change="onProcessCategoryChange">
                        <el-option
                                v-for="item in processCategoryList"
                                :key="item.processCategoryId"
                                :label="item.processCategoryName"
                                :value="item.processCategoryId">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="流程" prop="processDefinitionId">
                    <el-select v-model="form.processDefinitionId" clearable
                               placeholder="请选择流程">
                        <el-option
                                v-for="item in processDefinitionList"
                                :key="item.processDefinitionId"
                                :label="item.processDefinitionName"
                                :value="item.processDefinitionId">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="配置描述" prop="description">
                    <el-input type="textarea"
                              :rows="4"
                              v-model="form.description"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="submitForm('form')">立即创建</el-button>
                    <el-button @click="resetForm('form')">重置</el-button>
                </el-form-item>
            </el-form>
        </el-col>
    </el-row>

</div>

<th:block layout:fragment="staticFile">
    <script src="/js/process/config/add.js"></script>
</th:block>

</body>
</html>